package com.itheima.controller.backend.appointment;

import com.itheima.common.entity.Result;
import com.itheima.pojo.dto.ExamineDTO;
import com.itheima.service.ExamineService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/appointment/examine")
@Slf4j
public class ExamineController {
    @Autowired
    private ExamineService examineService;

    /**
     * 新增检测项
     * @param examineDTO
     * @return
     */
    @PutMapping
    public Result save(@RequestBody ExamineDTO examineDTO){
        log.info("新增检测项：{}",examineDTO);
        examineService.save(examineDTO);
        return new Result(true,"success");
    }
}
